//
//  GMSignVC.m
//  Teecloud
//
//  Created by 小熊 on 2018/12/10.
//  Copyright © 2018年 小志. All rights reserved.
//

#import "GMSignVC.h"

@interface GMSignVC ()
@property (weak, nonatomic) IBOutlet UIImageView *stateImg;
@property (weak, nonatomic) IBOutlet UILabel *signTime;
@property (weak, nonatomic) IBOutlet UILabel *signName;
@property (weak, nonatomic) IBOutlet UILabel *signAddress;
@property (weak, nonatomic) IBOutlet UILabel *signWifi;
@property (weak, nonatomic) IBOutlet UIButton *biaoqian;
@end

@implementation GMSignVC

- (void)viewDidLoad {
    [super viewDidLoad];
    [self addLeftBarButtonWithImage:[UIImage imageNamed:@"left-white-64"] action:@selector(left_BarButtonItemAction)];
    if ([self.model.SignStatus isEqualToString:@"SIGN-ENTER"]) {
        self.stateImg.image =[UIImage imageNamed:@"sign-enter"];
        self.title = @"签到成功";
    }else{
        self.stateImg.image =[UIImage imageNamed:@"sign-exit"];
        self.title = @"签退成功";
    }
    self.signTime.text = self.model.SignTime;
    self.signName.text = self.model.SignName;
    self.signAddress.text = self.model.SignAddress;
    self.signWifi.text = self.model.SignWifiName;
    self.biaoqian.layer.borderWidth = 1.0;
    [self.biaoqian setTitle:self.model.SignStatusName forState:UIControlStateNormal];
    if ([self.model.SignStatusName isEqualToString:@"正常"]) {
        [self.biaoqian setTitleColor:[UIColor colorWithHexString:@"007AFF"] forState:UIControlStateNormal];
        self.biaoqian.layer.borderColor = [UIColor colorWithHexString:@"007AFF"].CGColor;
    }else{
        [self.biaoqian setTitleColor:[UIColor colorWithHexString:@"FF7708"] forState:UIControlStateNormal];
        self.biaoqian.layer.borderColor = [UIColor colorWithHexString:@"FF7708"].CGColor;
    }
}
- (void)left_BarButtonItemAction {
    [self.navigationController popToRootViewControllerAnimated:YES];
}
- (IBAction)backBtnClick:(id)sender {
    [self.navigationController popToRootViewControllerAnimated:YES];
}
- (IBAction)backGroupClick:(id)sender {
     [self.navigationController popToRootViewControllerAnimated:YES];
}


@end
